package org.linuxsogood.boot.pojo;

import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;

/**
 * @author honway.liu
 * @date 2018/8/5 下午9:15
 * @email gm100861@gmail.com
 * @blog http://linuxsogood.org
 */
@Data
public class Blog implements Serializable {



    private Integer id;

    private Integer authorId;

    private String title;


    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        list.add("a");
        list.add("b");
        list.add("c");

        Optional<String> reduce = list.stream().reduce((s, s2) -> s.concat(",").concat(s2));
        System.out.println(reduce.orElse(null));


    }
}
